<HTML><HEAD><TITLE>el_weight(+Var, ?Wvar)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(conjunto)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>el_weight(+Var, ?Wvar)</H1>
Var is an element of type e(Val,Weight) from a weighted domain.  Wvar is a
free variable unifying with the weight Weight of Var.


<DL>
<DT><EM>+Var</EM></DT>
<DD>A weighted element.
</DD>
<DT><EM>?Wvar</EM></DT>
<DD>Term unifying with an integer.
</DD>
</DL>
<H2>Description</H2>
   Unifyes the weight of the term Var which should be of the form
   e(Val,Weight) with Wvar.  This predicate is convenient to select
   elements for the labeling of weighted sets.

<P>

<H3>Fail Conditions</H3>
   Fails if Var is not of the form e(Val,Weight) or if Wvar is not
   unifyable with the weight.


<H3>Resatisfiable</H3>
   No.
<H2>Examples</H2>
<PRE>
[eclipse 12]: E = e(1,2), el_weight(E, W).

E = e(1, 2)
W = 2
yes.



</PRE>
<H2>See Also</H2>
<A HREF="../../lib/conjunto/max_weight-2.html">max_weight / 2</A>, <A HREF="../../lib/conjunto/BNN-2.html">`:: / 2</A>
</BODY></HTML>
